home *** CD-ROM | disk | FTP | other *** search
-
-
- MODM0DEV(8) MiNT Programmer's Manual MODM0DEV(8)
-
-
- NAME
- modm0dev.ttp, modm0dev.syslog - install the /dev/cua0 and /dev/ttyd0
- devices
-
- SYNOPSIS
- modm0dev.ttp # light version
- modm0dev.syslog # syslog version
-
- DESCRIPTION
- modm0dev will install dial-in and dial-out devices for the Atari ST first
- serial interface, named /dev/ttyd0 and /dev/cua0 respectively. The former
- is usually attached to a getty process to handle the incoming calls,
- while the latter is used to initiate a call (for instance with cu or uucp
- ). The dial-in device monitors the DCD line of the serial port (unless
- you have specified the soft-carrier mode; see below) and no data can be
- read nor written if there is no connection. On the other hand, the dial-
- out device can communicate with the remote modem or terminal even if
- there is no connection present.
-
- These devices are mutually exclusive; although you can have
- simultaneously file descriptors for both devices, you won't be able to
- open the dial-out device if there is a connection on the dial-in one.
- Conversely, the dial-out device will be put in "idle" mode while
- /dev/cua0 is in use.
-
- Unlike the dial-in device, the dial-out device is always assumed to be
- opened in exclusive mode. Therefore, file locking is unnecessary on the
- dial-out device. It is rarely needed on the dial-in device, so it hasn't
- been implemented.
-
- It is sometimes desirable to assume that a carrier is always present on
- the serial device, especially when you have a terminal attached to it
- instead of a modem. This is called the "soft carrier" mode and can be
- modified with the TIOCSSOFTCAR ioctl call.
-
- In this case, it is also desirable to clear the hangup-on-close flag for
- the dial-in device, since a directly-attached terminal will probably
- ignore hangups. You can set this flag with the TIOCSHUPCL ioctl call.
-
- The installer should be run from your mint.cnf or /etc/rc.local
- configuration file, since init (1) will need the dial-in device to spawn
- a getty on it. It configures the serial interface to 19200 bps, one stop
- bit, eight-bit characters, and no parity. These settings can be changed
- by a subsequent stty (1) call. An enhanced version of stty , aware of the
- supplementary ioctl calls, is provided in the distribution. The
- software-carrier and hangup-control flags are called "local" and "hupcl".
-
- Apart from all standard terminal ioctl calls, the driver also recognizes
- the following ones (values are in modm0dev.h):
-
- TIOCFLUSH
- clears the input and output buffers.
-
- TIOCSBRK
- sets a break condition.
-
-
-
- September, 1993 1
-
-
-
- MODM0DEV(8) MiNT Programmer's Manual MODM0DEV(8)
-
-
- TIOCCBRK
- clears a break condition.
-
- TIOCIBAUD, TIOCOBAUD
- get and set the baud rate. The supported speeds are: 300, 600, 1200,
- 1800, 2400, 4800, 9600 and 19200 bps.
-
- TIOCGHUPCL
- takes a pointer to a short int; returns 1 if hangup-on-close is
- active, 0 otherwise. Default is 1.
-
- TIOCSHUPCL
- takes a pointer to a short int, containing the new value of the
- hangup-on-close flag. The old value is returned.
-
- TIOCGSOFTCAR
- takes a pointer to a short int; returns 1 if soft-carrier mode is
- active, i.e. if a carrier is assumed to be always present. Otherwise
- returns 0, meaning that the hardware carrier line is monitored.
- Default is 0.
-
- TIOCSSOFTCAR
- takes a pointer to a short int, containing the new value of the
- soft-carrier flag. The old value is returned.
-
-
- For security reasons, only root can open the dial-in and dial-out
- devices. An unprivileged user cannot change the global configuration
- either (baudrate, parity, and rts/cts, soft-carrier, hangup-on-close
- flags); the ioctl call will silently fail. However, setting the baud rate
- to 0 is allowed and will hang up the phone line immediately.
-
- SEE ALSO
- stty(1), init(1)
-
- DIAGNOSTICS
- Error messages during installation are reported on standard output, and
- modm0dev exits with a negative return-code.
-
- While the driver is running, hardware error messages (overrun error,
- frame error, parity error, break) are reported on the console if you're
- using the "light" version ( modm0dev.ttp ) or to the system logger with
- the "syslog" version ( modm0dev.syslog ).
-
- AUTHOR
- Thierry Bousch Internet: bousch@suntopo.matups.fr
- 44 Bd du Temple Fidonet: Thierry Bousch @ 2:320/100.9
- 75011 PARIS
- FRANCE
-
- BUGS
- Overrun errors (MFP internal overflow) are frequent when data are
- received continuously at high speeds on not-too-fast machines; at
- 19200bps on an 8MHz Atari ST, there can be an erroneous byte every ten
- kilobytes. Is it a bug in my code, or is it MiNT's context-switching
- code which prevents the interrupts from being serviced properly?
-
-
- September, 1993 2
-
-
-
- MODM0DEV(8) MiNT Programmer's Manual MODM0DEV(8)
-
-
- Since we are completely replacing the MFP interrupt routines, the
- standard device /dev/modem1 , as well as the standard bios functions,
- will no longer work (unless, of course, you redirect the AUX bios
- device).
-
- Synchronous modes are not supported. Not all speeds are supported. I did
- not try to implement higher speeds (38400 bps and more) because I already
- had too many errors at 19200 bps.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- September, 1993 3
-
-